<div class="detailsBox">
	<form class="action-ajax-form" action="/rmongo/gs_info_editsave" method="post">
<div class="openBox">
			<h3 class="mt20">
				<i class="jtIco"></i>经营补充信息
			</h3>
			<input type="hidden" value="${entity.id}" name="id" />
			<input type="hidden" value="${loanapplyNo}" name="loanapplyNo"/>
			<div class="detaiTab">
				<h3 class="mt20">渠道数据</h3>
				<table cellspacing="0" cellpadding="0" border="0" width="100%">
					<tbody>
						<tr>
							<td width="15%" align="right" class="bg"><span style="color:red;">*</span>本市场经营开始时间：</td>
							<td width="35%"><@date name="startOperateTime" value="${(entity.startOperateTime?string('yyyy-MM-dd'))!''}"/></td>
							<td width="15%" align="right" class="bg"><span style="color:red;">*</span>档口有无车位：</td>
							<td><@select dataSouceType="IS_GOAL" value="${entity.isParking}" name="isParking"/></td>
						</tr>
					</tbody>
				</table>
			</div>
			<div class="detaiTab">
				<h3 class="mt20">上游信息</h3>
				<table cellspacing="0" cellpadding="0" border="0" width="100%">
					<tbody>
						<tr>
							<td width="15%" align="right" class="bg"><span style="color:red;">*</span>是否有自有农场：</td>
							<td width="35%"><@select dataSouceType="IS_GOAL" value="${entity.isOwnFarm}" name="isOwnFarm"/></td>
							<td width="15%" align="right" class="bg"><span style="color:red;">*</span>是否向固定农户采购：</td>
							<td><@select dataSouceType="IS_GOAL" value="${entity.isFarmer}" name="isFarmer"/></td>
						</tr>
						<tr>
							<td width="15%" align="right" class="bg"><span style="color:red;">*</span>是否向其他供菜商采购：</td>
							<td colspan="3"><@select dataSouceType="IS_GOAL" value="${entity.isOtherPurchase}" name="isOtherPurchase"/></td>
							<!-- <td width="15%" align="right" class="bg"><span style="color:red;">*</span>其他方式：</td>
							<td><input type="text" value="${entity.otherMode}" name="otherMode" maxlength="100" placeholder="限100字内"/></td> -->
						</tr>
						<tr>
							<td width="15%" align="right" class="bg">自有农场地址：</td>
							<td colspan="3">
							<@select dataSouceType="province" name="officeprovince"  id="provinceId" value="${entity.officeprovince}" onchange="provinceOnchange()" />
                            &nbsp;&nbsp; <@select dataSouceType="city" dataSouceFrom="${entity.officeprovince}" name="officecity"  id="cityId"  value="${entity.officecity}" onchange="cityOnchange()" />
                            &nbsp;&nbsp; <@select dataSouceType="country" dataSouceFrom="${entity.officecity}" name="officecounty"  id="select_districtId" value="${entity.officecounty}"/>
							<input type="text" value="${entity.detailAddress}" name="detailAddress" maxlength="100" placeholder="限100字内"/></td>
						</tr>
						<tr>
							<td width="15%" align="right" class="bg">其他方式说明：</td>
							<td colspan="3"><textarea rows="3" cols="100" name="otherModeRemark" maxlength="500" >${entity.otherModeRemark}</textarea></td>
						</tr>
					</tbody>
				</table>
			</div>
			<div class="detaiTab">
				<h3 class="mt20">下游信息</h3>
				<table cellspacing="0" cellpadding="0" border="0" width="100%">
					<tbody>
						<tr>
							<td width="20%" align="right" class="bg">渠道</td>
							<td width="20%">二批商</td>
							<td width="20%">商超</td>
							<td width="20%">团购（酒店、食堂等）</td>
							<td width="20%">零售终端</td>
						</tr>
						<tr>
							<td align="right" class="bg"><span style="color:red;">*</span>近六个月销售量：</td>
							<td><input type="text" value="${entity.twoBatch}" class="inputNum" name="twoBatch" maxlength="30" placeholder="数字，限30字内"/></td>
							<td><input type="text" value="${entity.supermarket}" class="inputNum" name="supermarket" maxlength="30" placeholder="数字，限30字内"/></td>
							<td><input type="text" value="${entity.groupPurch}" class="inputNum" name="groupPurch" maxlength="30" placeholder="数字，限30字内"/></td>
							<td><input type="text" value="${entity.retail}" class="inputNum" name="retail" maxlength="30" placeholder="数字，限30字内"/></td>
						</tr>
					</tbody>
				</table>
			<table cellspacing="0" cellpadding="0" border="0" width="100%">
				<tbody>
					<tr>
						<td width="20%" align="right" class="bg"></td>
						<td>
						<@permission permissionName="UpdateInternalInfo">
       						<input class="btn_auto_30 btn_blue" value="保  存" type="submit">
       					</@permission>
       					</td>
					</tr>
				</tbody>
			</table>
			</div>
			<div class="detaiTab">
			        <h3 class="mt20">
			            主要产品销售情况
			        <@permission permissionName="UpdateInternalInfo">
			            <a class="action-ajax-btn fr edit btn_blue"
			               href="/rmongo/gs_info_addp?loanapplyNo=${loanapplyNo}&type=addp" target="_self">新增</a>
			        </@permission>
			        </h3>
			        <div class="detailTab">
			            <div class="action-ajax-load" data-url="<@url value='/rmongo/gs_info_plist?loanapplyNo=${loanapplyNo}&type='/>" data-ajax-wait-img="<@cdn value='img.wait'/>" >
			        </div>
			        </div>
			</div>
	</div>
	</form>
</div>
<@js>
		function provinceOnchange() {
			var provinceCode = $("#provinceId").val();
			var url = "<@url value='/common/findCityByProvinceCode' domain='${crmUrl}'/>";
			$
					.ajax({
						type : "GET",
						url : url,
						data : {
							provinceCode : provinceCode
						},
						dataType : "jsonp",
						jsonp : "_callback",
						success : function(result) {
							var t = $("#cityId").find("option:selected")
									.text();
							$("#cityId").empty();
							$("#cityId").append(
									"<option value=''>请选择</option>");

							$.each(result.data, function(key, value) {
								if (t == value[1]) {
									$("#cityId").append(
											"<option selected = 'selected' value='"+value[0]+"'>"
													+ value[1] + "</option>");
								} else {
									$("#cityId").append(
											"<option value='"+value[0]+"'>"
													+ value[1] + "</option>");
								}
							});
						}
					});
			cityOnchange();
		}
		
		function cityOnchange() {
			var cityCode = $("#cityId").val();
			var url = "<@url value='/common/findDistrictByCityCode' domain='${crmUrl}'/>";
			$.ajax({
				type : "GET",
				url : url,
				data : {
					cityCode : cityCode
				},
				dataType : "jsonp",
				jsonp : "_callback",
				success : function(result) {
					var t = $("#select_districtId").find("option:selected")
							.text();
					$("#select_districtId").empty();
					$("#select_districtId").append(
							"<option value=''>请选择</option>");

					$.each(result.data, function(key, value) {
						if (t == value[1]) {
							$("#select_districtId").append(
									"<option selected = 'selected' value='"+value[0]+"'>"
											+ value[1] + "</option>");
						} else {
							$("#select_districtId").append(
									"<option value='"+value[0]+"'>" + value[1]
											+ "</option>");
						}
					});
				}
			});
		}
</@js>
    <@jsRender/>